package com.cc8w.service;

import com.cc8w.entity.TeacherPojo;
import com.cc8w.mapper.PermssionMapper;
import com.cc8w.mapper.UserMapper;
import com.cc8w.util.ReturnData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service("permssionService")
@Transactional
public class PermssionService {
	@Autowired
	@Qualifier("permssionMapper")
	private PermssionMapper permssionMapper;

	/**
	 * 通过用户名获取权限
	 * @param userName
	 * @return
	 */
	public List<String> queryPermissionsByUserName(String userName) {
		List<String> permited = permssionMapper.queryPermissionsByUserName(userName);
		return permited;
	}


}
